// 分类管理路由模块 /admin/product/baseCategoryTrademark/xxx
const express = require('express')
const { authMiddleware } = require('../../middlewares/authMiddleware');
const { apiPathMiddleware } = require('../../middlewares/apiPathMiddleware');
const trademarkController = require('../../controllers/product/brandController');

const router = express.Router();

// 获取全部品牌
router.get('/getTrademarkList', authMiddleware, trademarkController.getAllTrademark)
// 添加品牌
router.post('/save', authMiddleware, 
  apiPathMiddleware('baseTrademark/save'), trademarkController.addTrademark)
// 删除品牌
router.delete('/remove/:id', authMiddleware, 
  apiPathMiddleware('baseTrademark/remove'), trademarkController.removeTrademark)
// 更新品牌
router.put('/update', authMiddleware, 
  apiPathMiddleware('baseTrademark/update'), trademarkController.updateTrademark)
// 获取品牌列表
router.get('/:page/:limit', authMiddleware, trademarkController.getTrademarkList)

module.exports = router
